import { createApp } from 'vue'

import App from './App.vue'
import router from './router'
import store from "./store/index.js";
import {useUserStore} from './store/userStore';

// 引入antd
import Antd from "ant-design-vue";
import "@/assets/css/theme-antd.less";

import 'highlight.js/styles/atom-one-dark.css'
import 'highlight.js/lib/common'
import hljsVuePlugin from '@highlightjs/vue-plugin'

import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';

// highlightjs
import hljs from 'highlight.js';

import "@/utils/microsoft.cognitiveservices.speech.sdk.bundle.js";

VMdPreview.use(githubTheme, {
  Hljs: hljs,
});

// 设置默认模型
setTimeout(() => {
	useUserStore().setModelType('GPT3.5');
}, 200);

createApp(App)
.use(router)
.use(store)
.use(Antd)
.use(hljsVuePlugin)
.use(VMdPreview)
.mount('#app')
